package com.ctshk.rpc.order.air.req.app;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @BelongsProject: ctshk-cloud
 * @BelongsPackage: com.ctshk.rpc.order.air.req.app
 * @Author: hef
 * @CreateTime: 2021-05-20 14:03
 * @Description: 描述
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class AddOrderReq implements Serializable {

    @NotNull(message = "机票列表不能为空")
    @Size(min = 1, message = "机票列表不能为空")
    @ApiModelProperty(value = "机票列表")
    private List<OrderProductReq> orderProductList;

    @NotNull(message = "乘客信息为空")
    @Size(min = 1, message = "乘客信息为空")
    @ApiModelProperty(value = "乘客信息列表")
    private List<OrderTouristReq> touristList;

    @ApiModelProperty(value = "优惠券代码")
    private String couponCode;

    @ApiModelProperty(value = "订单备注")
    private String remark;

    @NotNull(message = "订单行程类型不能为空")
    @Range(min = 1, max = 3,message = "订单行程类型错误")
    @ApiModelProperty(value = "订单行程类型 1.单程 2往返 3 多程")
    private Integer tripType;


    /*@NotNull(message = "联系人信息不能为空")
    //@Size(min = 1, message = "联系人信息不能为空")
    @ApiModelProperty(value = "联系人信息列表")
    private AppContactReq appContactReq;

    @NotNull(message = "紧急联系人信息可以为空")
    @ApiModelProperty(value = "紧急联系人信息列表")
    private AppUrgentContactReq appUrgentContactReq;*/

    @NotBlank(message = "联系人姓氏不能为空")
    @ApiModelProperty(value = "联系人姓", required = true)
    private String surname;

    @NotBlank(message = "联系人名不能为空")
    @ApiModelProperty(value = "联系人名", required = true)
    private String name;

    @NotBlank(message = "联系人手机不能为空")
    @ApiModelProperty(value = "联系人手机", required = true)
    private String contactMobile;

    @NotNull(message = "联系人手机区号id不能为空")
    @ApiModelProperty(value = "联系人手机区号id", required = true)
    private Long contactMobileAreaCodeId;

    @NotBlank(message = "联系人手机区号不能为空")
    @ApiModelProperty(value = "联系人手机区号", required = true)
    private String contactMobileAreaCode;

    @NotBlank(message = "联系人邮箱不能为空")
    @ApiModelProperty(value = "联系人邮箱", required = true)
    private String contactEmail;

    @NotNull(message = "联系人称谓不能为空")
    @ApiModelProperty(value = "称谓(1:先生;2:女士;3:小姐;4:男童;5:女童)", required = true)
    private Integer appellation;

    @NotNull(message = "总金额")
    @ApiModelProperty(value = "总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty(value = "发票抬头")
    private String invoiceTitle;

    /**
     * 渠道id
     */
    @JsonIgnore
    private Long channelId;

    @ApiModelProperty(value = "用户ID")
    private Long userId;
}
